I have a project that worked fine in beta2 but now it's broken with the following runtime error.
dyld: Symbol not found: __TWPVSs26AutoreleasingUnsafePointerSs8_Pointer
Referenced from: /var/mobile/Applications/6A8ABF68-4B3D-464A-9322-3B3F61B429E2/MovieLookUp.app/MovieLookUp
Expected in: /private/var/mobile/Applications/6A8ABF68-4B3D-464A-9322-3B3F61B429E2/MovieLookUp.app/Frameworks/libswift_stdlib_core.dylib
in /var/mobile/Applications/6A8ABF68-4B3D-464A-9322-3B3F61B429E2/MovieLookUp.app/MovieLookUp
I have changed all arrays etc. to the new standard (got nice warnings and autocorrection boxed for them). I'm pretty new to iOS coding so I need some guidance that might give me a better clue at this matter.
I still have a warning and get the same problem as mentioned in: relocatable dylibs (e.g. embedded frameworks) are only supported on iOS 8.0 and later (#rpath/libswift_stdlib_core.dylib)
Thanks!
I was getting the same error and I solved it by:
Opening the organizer in XCode 6 Beta3 (Window -> Organizer)
Selecting the "Projects" tab at the top
Selecting my project in the left hand side column
Selecting the "Delete..." button next to the Derived Data location
My swift application now runs on iOS 7.1.2 on my iPhone 4
I solved this by deleting the cached files in ../DerivedData/* and ~/Library/Caches/com.apple.dt.Xcode
cleaning DerivedData folder resolves the issue.
I had to add import Foundation to the first line of my AppDelegate.swift file (Xcode 6 Beta 3)
Related
With Xcode 8 the errors could be fixed using the "Fix all in Scope", but in the latest Xcode 9 that option is always greyed out. Do you have an idea if I have to set up something or if it's just a bug?
The Xcode I'm using is the App Store version, build number 9A235, so it's not a beta.
Usually it helps to clean "derived data", the project and to restart your mac. Feels like Windows but I have good experiences with this kind of bugs.
Navigate to the deived data folder in Finder. For this open tab Locations in XCode Settings where you will find a link. Delete all data within derived data folder. (No worry - it will be restored by XCode)
look for and select the page you have error and there is the word fix
and go Editor >>>> Fix All Issues
Hi My code was running perfectly in xcode 7.x.x
As soon as i updated my xcode i am getting this issue please give me the solution for this.
Details :
dyld: Symbol not found: _kABPersonAddressCityKey Referenced from:
/var/containers/Bundle/Application/0A16B18D-CB72-4FCA-94F7-422AFD1411AD/ABCD.app/ABCD
Expected in: /System/Library/Frameworks/PassKit.framework/PassKit in
/var/containers/Bundle/Application/0A16B18D-CB72-4FCA-94F7-422AFD1411AD/ABCD.app/ABCD
Add PassKit.framework to your Link Binary With Libraries in your Build Phases and set its Status to Optional
There are two things that might fix your problem:
1- Open your target -> Build Phases -> Link Binary With Libraries -> Add AddressBook.framework
2-
AddressBook framework was deprecated in iOS 9. Apparently your app will crash if you compile the code on Xcode 8 and run on a iOS 9 or lower device.
I recommend migrating to Contacts framework and/or have preprocessor macros that don't include the AddressBook framework code when built on iOS 10.
Source: https://github.com/OceanLabs/iOS-Print-SDK/issues/257
Paul Senabre's solution worked for me, thank you, thank you, thank you! This has been driving me nuts!
Adding PassKit.framework solved but problem, but make sure to add it for all of your targets! When you add it, it only affects your current target. BTW, my app with a target of iOS-8 ran fine with iOS-10 in Xcode-8, but would crash with anything previous to iOS-10.
I have been working on an iOS project solely in Xcode. Deployment target is iOS 8.0. After updating to Xcode 6.x, building and testing on my iPhone 5s and iPhone 6 as well as the simulators works fine. However, when I create an archive and want to validate it, I get the following error:
Archive validation failed due to the issues listed below.
iTunes Store operation failed.
Invalid Segment Alignment. This app does not have proper segment alignment and should be rebuilt with the latest version of Xcode. Please contact Developer Technical Support if you need further assistance.
I have googled for the past couple of days and it seems that this problem mostly occurs in connection with other development tools, especially from Adobe. However, I have only used Xcode for development.
This is what I have tried so far:
Reinstalling Xcode 6.01
Turning Autolayout on and off
Set target from 8.0 to 7.1
Just submit the archive (no error message, but new version is not found in Testflight)
Unfortunately, none of this has worked. My questions:
What does the error message want to tell me?
Has anyone any idea how to solve this problem?
Thanks a lot!
I found the solution. XCode seems to have lost track of two of my files (XX.h and XX.c) This file name (with a .o extension) was in the summary of the 1st step of the validation.
I removed the references to both files, added them again and everything works fine. Hope that helps someone!
(Edit: sorry, cannot flag this answer as the right answer, will do so in two days when stackoverflow lets me)
More detailed instructions:
When pressing "Validate" in the Organizer, look at the "Summary" dialog that pops up
If there are any .o files listed in addition to your app, go back to Xcode and remove the corresponding .h AND .m files from your project (removing the reference is sufficient)
Re-add them by dragging and dropping them back into your project
Recompile and it should work (assuming you're not using Adobe Air components in your app)
(thanks a million for this post Fynh, your fix made it finally work for me!)
In my case I was submitting an app that include a framework I had built that was a universal framework - created using lipo (for use with both device and simulator).
After replacing the universal compiled framework with device compiled framework, validation was successful.
To fix this bug I had to go Targets / Build Phases / Expand Copy Bundle Resources and remove the empty.cpp file (my error was about a empty.o file)
Hope this helps someone
I have a project that compiled just fine in XCode 6 beta, but now, in the GM, it won't compile for an iOS device, giving the error:
myController.m:393:9: No visible #interface for 'UIDevice' declares the selector 'initialize:'
at this line:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
It still compiles absolutely fine for the simulators; I've also tried these fixes:
Cleaned the whole project and re-built.
Deleted all Derived Data from ~/Library/Developer/XCode
Re-installed XCode
Checked XCode preferences and pointed Command Line Tools location to XCode 6 (XCode 5 is still installed on the machine and it was pointing there)
...but with no luck. Same error on compilation.
Help! We're on a tight timescale with iOS8 now approaching, and this is a real headache.
PS: We're also using Cocoapods in the workspace, for what it's worth.
OK, I solved this one after rather a lot of hair-pulling. The app in question is an iOS 8 app, with an embedded Today Extension.
It turned out that, when adding the Today Extension, XCode had added a build setting:
'Enable Modules (C and Objective-C': YES
Neither my project nor my containing app targets used this build setting, but setting it to YES caused issues to do with trying to link Frameworks automatically (and failing) and all sorts of related odd error messages that ultimately related to header files.
The problem was further compounded because there are source files that are members of both the containing app's target and also the Today Extension's target.
Hope this info helps somebody else.
Carl
Update 2: This is an old question involving the developer beta of iOS 8 and Xcode. The problem was that the Swift standard library wasn't included in the iPhone 4s iOS 8 beta. The issue has been resolved in the release.
Update: I've been getting fed up with the errors and crashes that come along with beta software, so I decided to reset my phone to iOS 7.1.1 and now the error is gone... I have no idea what is going on, but I'm going to assume its a bug since iOS 8 is still in beta. I will file a bug report with Apple and hope it gets resolved with the next seed.
As many other people before me, I am receiving the following error message when running a swift-based app on my iPhone (4S running iOS 8.0 beta 1):
dyld: Library not loaded: #rpath/libswift_stdlib_core.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/
CDC7263B-9F18-4369-87CC-F36DB5163B99/TESTPROJECT.app/TESTPROJECT
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/
CDC7263B-9F18-4369-87CC-F36DB5163B99/TESTPROJECT.app/Frameworks/
libswift_stdlib_core.dylib: mmap() error 1 at address=0x00206000,
size=0x00128000 segment=__TEXT in Segment::map() mapping
/private/var/mobile/Containers/Bundle/Application/
CDC7263B-9F18-4369-87CC-F36DB5163B99/TESTPROJECT.app/Frameworks/
libswift_stdlib_core.dylib
When running on the iOS simulator (iPhone 4S), I get the following (many times):
SetAppThreadPriority: setpriority failed with error 45
- This is a new single view application project generated from the built-in templates with Xcode 6 beta, with none of my own code. (Also happens with an empty application)
- I have already tried the solution found here (restarting Xcode)
I can't seem to find any other way of moving/accessing the required swift library.
For me, quitting and relaunching Xcode made this go away.
I ran into the same problem and I think it maybe because the app has to be configured to dynamically load certain frameworks. In any case changing the "Runpath Search Paths" build setting to "#executable_path/Frameworks" seemed to fix the problem.
I'm guessing that Xcode sets this automatically for new projects but older projects may need to be fixed manually. In my older project it was blank.
I hit this problem in simulator. I tried some settings listed here http://ikevin.tw/?p=174.
In summary, Defines Module -> Yes, Embedded Content Contains Swift Code -> Yes, Product Module Name -> [My product name].
These changes managed to get me to launch and run.
The trick is that afterwards, I reverted the changes to see which of them actually made a difference. After reverting all of them, the app still launched. So it's completely unclear what actually caused the app to end up launching.
I'm guessing your iPhone 4S is lower than iOS 6. We also did regression tests on iPhone 4S's on iOS 6 and 7 but they were all fine. Devices on iOS 5 and 5.1 had the same error as you have though.
I had this issue using an Ad Hoc (or enterprise) mobileprovision with a production certificate. Switching to a development certificate and mobileprovision solved the issue.
99% of the time when you get an error like this when upgrading the beta, it's the cache in ~/Library/Caches/com.apple.dt.Xcode* directories. Delete these and rebuild.
I had the same issue on an exploratory project. When I tried to build on a device I got the error. All I had to do was set the 'Provisioning Profile' in 'Code Signing' and everything worked.