Building for MacOSX, but linking against dylib built for iOS Simulator file
The problem was that Xcode 5 replaces gcc with clang and adds in a "-triple" option that specifies OSX as the target. If you pass "-miphoneos-version-min=7.0" on both gcc command lines it works. You can see the clang command line if you pass "--verbose" to gcc. It's also necessary to add to the PATH for Xcode 5 so that cmake can find the necessary tools: export PATH=/Applications/Xcode5-DP6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode5-DP6.app/Contents/Developer/usr/bin:$PATH None of this is official.. but works for me so far.
warning message linking against a dylib which is not safe for use in application extensions
If you are linking against a framework you control, select the framework target in your project. In the General tab, look at Deployment Info and you will see a line:
App Extensions: [ ] Allow app extension API only
Select the checkbox, and you should be able to link against this framework.
This checkbox ensures that only calls to APIs that are valid within App Extensions are used.
Xcode building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'
Basically, you have to exclude arm64
for the simulator architecture, both from your project and the Pod project.
To do that, navigate to Build Settings of your project and add Any iOS Simulator SDK with value
arm64
inside Excluded Architecture.
OR
If you are using custom
XCConfig
files, you can simply add this line for excluding simulator architecture.EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
Then
You have to do the same for the Pod project until all the Cocoa pod vendors are done adding following in their Podspec.
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }You can manually add the Excluded Architecture in your Pod project's Build Settings, but it will be overwritten when you
usepod install
.In place of this, you can add this snippet in your
Podfile
. It will write the necessary Build Settings every time you runpod install
.post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Duplicate dylib warning in xcode
Well you need to find that duplicate file first,You are having that file more than once thats why its happening , and then delete that file and moreover also delete the app from the simulator.Remove the build,clean the targets and then run your app.Hope it would help you dear.....
Have a great time and coding bro....
Related Topics
Set<Nsobject>' Does Not Have a Member Named 'Anyobject." - Xcode 6.3
Using Sysctlbyname() from Swift
Swift 3 - Alamofilre 4.0 Multipart Image Upload with Progress
Uitableviewcell Textlabel Color Not Changing
Nstask or Equivalent for Iphone
Seed and Maintain Cloudkit Public Database Without Requiring Icloud Login
How to Programmatically Get iOS's Alphanumeric Version String
Swift: Gradient Along a Bezier Path (Using Calayers)
Document Directory Path Change When Rebuild Application
Swiftui How to Align a View That's Larger Than Screen Width
Healthkit Authorisation Status Is Always 1
Uiscrollview with Dynamically Sized Content
Can the -Objc Flag Be Applied Selectively to Static Libraries
How to Make Alamofire Download Progress Run in Background iOS