Universal linking not working - deep-linking

I'm done how to universal linking setup but in entitlements file app target had unselected and disable to select. I didn't understand how to solve it.

Build Phases -> Copy Bundle Resources -> select your "*.entitlements" file
This should add the tick mark in the target and fix your issue.

Related

Error while migrating project from Xcode 10.3 to Xcode 11.5

I am trying to migrate swift project from Xcode 10.3(swift 4.2) to Xcode 11.5(Swift 4.2) but getting error. The below error I get when I run the project first time.
and if I fix this error by setting the Build Distribution property to "NO" then I get the below error.
Now I want to set the Build Distribution property to Yes and want to fix the bridging header issue. I have explored for all the possible solutions but unable to find the right one which could fix it. Please help.
This is my podfile
Problem is your PaymentSDK is old.
First remove the old framework and follow below steps to get a new one and update it.
For Swift
Download the sdk from here. You have an option to download bitcode enabled and disabled SDK
Open your project in XCode and from File menu, select Add files to "yourproject"
Select Paytm.framework in the directory you just unzipped
Make sure 'Copy items if needed' is checked and Click 'Add'
Under "Link Binary With Libraries" in the "Build Phases" tab of your project settings, add SystemConfiguration.framework
Check if PaytmSDK.framework is added in both “Link Binary With Libraries” and “Embedded Binaries”. If not, add by clicking on the plus icon
Referemce from here.

Xcode - Bundle format unrecognized, invalid, or unsuitable

Ok so I have just about managed to get to this point on my own but am now having some issues code signing the app specifically with the AdMob framework. I am getting this error:
Command /usr/bin/codesign failed with exit code 1 the details it are giving are as follows: Applications/MyApp.app/Frameworks/GoogleMobileAds.framework: bundle format unrecognized, invalid, or unsuitable
I have read the other posts on the site and tried many different ways of fixing this. If I untick 'Code Sign On Copy' the archive builds successfully but then fails on validation with a match error. This is how I have my frameworks set up currently:
Any help would be much appreciated!
I saw this same issue with a different framework.
The solution for me was removing the framework from the 'Embedded Binaries' section and only adding it to the 'Linked Frameworks and Libraries' section in the target 'General' tab.
I have just seen the same issue but with a different framework that was the social framework and then I did below:
go to build phase -> embed frameworks -> press copy only when installing check box
then it worked with me with no error
I had a similar problem but with a different framework. The solution for me was to make sure that the framework was present in these three places:
General tab:
Embedded Binaries
Linked Frameworks and Libraries
Build Phases tab:
Embed Frameworks
I ran into this issue when using a different framework.
Clear the DerivedData solve this issue.
https://docs.sentiance.com/sdk/troubleshooting/ios/bundle-format-unrecognized-invalid-or-unsuitable
Go to Xcode menu bar and select File > Project Settings (or Workspace Settings).
Under Per-User Workspace Settings, find the shortcut to DerivedData folder and open it via Finder.
Remove the entire content of the folder and empty the Trash.
Restart Xcode.
In Xcode 11.*
Target -> General -> Linked Frameworks and Libraries
change related framework with option "Do Not Embed"
Else Check on the :
Target -> Build Phase -> Link Binary With Libraries
Check status with Required/Optional - try it with required first.

dyld: Symbol not found: __TMPdCSs12AnyGenerator

when I try to build and Run my project it gives me an error of symbol not found: __TMPdCSs12AnyGenerator
I had installed Xcode 7 beta on my system. When I installed it gives me an error of realm module not found so I just removed realm framework and added again after adding this frameworks again it gives about stated error.
I have encountered this problem after I update my XCode from 7.2 to 7.3. I use a framework build from XCode7.2. After I rebuild the framework on XCode7.3, the problem was solved.
You need to add Realm.framework and RealmSwift.framework to the “Embedded Binaries” section of your Xcode target.
You can check, if you have followed these steps correctly by following these steps:
Select your project in the Project Navigator.
Select your application target in the side bar in the section "Targets".
Navigate to the tab "Build Phases"
Expand the phase "Embed Frameworks"
The destination should equal "Frameworks". The list should contain Realm.framework and RealmSwift.framework.
If such phase doesn't exist, please create a Copy Files phase by clicking on the plus in the upper left corner and selecting "New Copy Files Phase". Select as destination "Frameworks" and add the Realm.framework and the ReamSwift.framework there.
I've added two exemplary screenshots below, so you can compare graphically how it should look like.
General Tab
Build Phases Tab
Application Bundle in the Built Products Directory
there's an update released for these frameworks to support Swift 2.2 (Xcode 7.3):
https://github.com/realm/realm-cocoa/releases/tag/v0.98.6

Crashlytics Framework doesn't detect the Info plist on iOS

I am trying to add Crashlytics framework in my project, however, when I go through the process and reach the point where I add the framework to the project. The "Fabric" script plugin on the Mac doesn't detect that the frame work has been add to the project, and I think because the it doesn't detect the Info.plist in my project as I have changed the name of the Info.plist to something else. I have tried to change it back to Info.plist but still doesn't work.
How can I make the framework to detect the info.plist in my project.
Thanks
I'm not sure if what I encountered was the same thing, but when trying to archive my project, I received the following error:
❌ error: Fabric: Info.plist Error
I poked through the output in XCode which mentioned it could be a timing issue and to make sure that I made the "Fabric" build phase one of the last build phases. So I updated the XCode configuration and made the Fabric step run just before the "Upload Symbols to Fabric" step, and this cleared up the issue. See the image below.
The root cause for me was an empty Bundle Identifier (although the key was set in info.plist).
After setting up a new XCode-project as a copy of another one i copied the info.plist with all keys into the new project. But it uses variables like $(PRODUCT_BUNDLE_IDENTIFIER), which was assigned somewhere else (maybe in the project file, that i haven't copied also)
In the screenshot the field with the round oval was empty then as a result. After applying the correct bundle identifier, everything has built fine.
Xcode 10 only:
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Move the RunScript in Target -> Build Phase to the last and give it a try:
Did you add the Fabric NSDictionary entry to your .plist(s)?
Set absolute path of Info.plist in "Input Files"
Add/Change "Input Files" value in Run Script added for Fabric under "Build Phases"
From "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)" To "new path*/Info.plist"
*new path: You can also get Info.plist path from Build Settings -> Packaging -> Info.plist File
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Note: Put exact same lines as given above to resolve this issue I am using Xcode_10.1 and this is working perfectly fine for me and on Fabric official website they specifically mention the same solution as given abovePlease refer this image to see attached screenshots of Xcode to get more details about where to put this line
Xcode 10 only:
Add your app's built Info.plist location to the Build Phase's Input Files field:
$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
at the same time, Move the runscript to the last row.

dyld: Library not loaded: #rpath/libswiftCore.dylib / Image not found

I am running my app from xcode to my iOS device and I get this and black screen on iOS device.
Console text:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/10DB2FE8-EF09-4857-B4AC-0DB2E4419D6F/App-Name.app/App-Name
Reason: image not found
(lldb)
Try adding the following line to Runpath Search Paths of your target.
#executable_path/Frameworks
your_target -> Build Settings -> Linking -> Runpath Search Paths
I had this same issue. I ended up adding the framework in the following locations:
General > Embedded Binaries
General > Linked Frameworks and Libraries
Build Phases > Link Binaries with Libraries
The embedded binaries seemed to be the key for me.
For me helps adding #executable_path/Frameworks to the project Runpath Search Paths, not target.
your_project -> Build Settings -> Linking -> Runpath Search Paths
None of the other solutions helped me, but everything was fixed by deleting Xcode's Derived Data directory.
Oh yes. I've faced with that problem spending hours on solution.
You may try to set "Always Embed Swift Standard Libraries" to "Yes" under your Build Settings > Build Options
(don't forget to shift+cmd+K your project after)
I had to switch 'Embedded Content Contains Swift Code' to 'Yes' to get my Obj-C app to work after updating the Obj-C embedded framework with a Swift object.
In the Framework Target (not the app target), go to Build Settings > Build Options > Always Embed Standard Swift Libraries to YES.
This solved the issue for me!
I had this error in a command line project (Xcode 10.2 and macOS 10.14.3)
The solution was to update to macOS 10.14.4
Swift command line projects won’t run on macOS 10.14.3 and earlier unless you install the Swift 5 Runtime Support for Command Line Tools package. Without that package, Swift command line projects crash on launch with “dyld: Library not loaded” errors. (46824656)
From Swift 5 Release Notes for Xcode 10.2
In my case, This issue is coming in Objective-c project in which I am using a Swift framework (AirWatch SDK).
Solutions:
I have resolved this issue with Xcode 9.3 and 11.0.1 iOS as mentioned bellow steps :
Drag and drop your swift framework in your project and move in default Framework folder of your project.
Then add them as Embedded binaries as shown in screenshot.
Change your framework status from Required to Optional as shown in screenshot. (Build Phases > Link Binary with Library)
Set Always Embed Swift Standard Libraries to Yes in your build settings.
Set Subpath and select destination as Framework for your added framework in Build Phases> Embed frameworks
as shown in screenshot.
Hope it will help someone.
I have faced the same issue, setting the right code sign identity solved the problem(Build settings->Code Signing Identity).
As per Apple technical questions "All Enterprise and standard iOS developer certificates that are created after iOS 8 was released have the new Team ID field in the proper place to allow Swift language apps to run"
I fixed by deleting all from Xcode Derived Data directory:
~/Library/Developer/Xcode/DerivedData
Good luck all!
This error message can also occur when using a framework build in a different Swift version then the one currently being used, e.g. if you upgrade Xcode.
I had the same error message, that is how I solved it :
The issue came from the certificates generated automatically by Xcode. I had to revoke these certificates dans generate them back from developer.apple.com
The solution is then :
- Go to developer.apple.com / certificates --> Revoke certificates
OR go in Xcode > preferences > accounts > View details > select Sigining identities > clic setting whell > revoke
- Got to developper.apple.com and follow instructions to generate new certificates
- In Xcode in my project : go to Code Signing Identity and sign both Debug lines with the generated certificate
- Both release lines are set to "iOS Developer"
- Then project > clean
- Build and run on device
#Saikiran's answered worked.
My certificates were generated before iOS 8 was released. I revoked all my certificates and regenerated all provisioning profiles and it solved my problems immediately.
I don't have enough reputation to vote up #Saikiran's answer, but that definitely helped solving the problem.
For me has worked set the option
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
to YES in Project -> Build Settings -> Build Options
(Namirial framework through Cocoapods)
None of the above solutions worked for me. I changed the iPhone Developer Certificate trust settings in Keychain. It should be Always Trust. Change it to Use System Defaults. Double click the certificate in Keychain to open the option screen
Discovered that from this blog
I had the same error message, this is how I solved it :
This is happening because i changed bundle identifier, so i just put old bundle id and it started to work again
I already had the Runpath Search Paths set correctly, but it still didn't work. #Justin Domnitz's answer put me on the right track: Setting "Always Embed Swift Standard Libraries" to Yes in my target's build settings did the trick for me.
Seems this issue was caused by the inclusion of Swift file into objective-c custom framework. Also unsure if related but my app target was built in objective-c as well. Also building to simulator in debug. Haven't verified for release or archive build yet.
Additionally Runpath Search Settings for the project target were set to "#executable_path/Frameworks", within the target settings for the framework they were set to: "#executable_path/Frameworks" and "#loader_path/Frameworks".
After having tried rebuilding custom framework and reattaching to app target, clearing derived data folder and a couple other suggestions, what ultimately worked for me was changing the build setting within Project target for the custom framework project (not app target): "Always Embed Swift Standard Libraries" to "YES". It appeared not to matter what the setting for the app target was set to. I verified this by resetting the simulator and rebuilding. This is similar to Daniele Ceglia's answer but I wasn't able to add a comment and wanted to provide more clarity.
For me Cleaning the project solve the issue!
I got such issue, too
All other ways could not help me,
so I have done it on stupid way
created new project and pod install from scratch
and after confirmed it is working correctly, I copied all class files and storyboard files, at last done!
I think it is the last way for it, maybe could help you
I had a similar problem in an Objective-C project where I started to include Swift files.
In my case, I created two targets in the main project, and I added a Swift empty file, that creates a bridging header file and some configurations, but I only marked it as a member of one target. The first target works properly, but the second not, and I noticed that the differences in build settings were this setting:
Runpath Search Paths -> $(inherited) and #executable_path/Frameworks
And I also needed to reference Objective-C Bridging Header to the file that was created before:
Objective-C Bridging Header -> pathTo/Target-Bridging-Header.h
After adding this two settings, the second target started to work properly.
Try cleaning the build folder, I was having the same problem and I solved it this way:
Product -> Clean Build Folder
For Me restart simulator solved this problem.
I tried a bunch of the cases above and it didn't seem to solve my issue. I use git and cocoapods for a project, and the error went away as soon as I made a new commit.
I had this problem before in iPod touch iOS 9.3. And I used all the methods mentioned in this post, but none of them worked.
I checked my project setting. And in the other link flag, I found I added -Wl,-sectcreate,__RESTRICT,__restrict,/dev/null.
This flag prevents dyld insert in the jailbroken phone. When I delete this flag, the app can be launched again. I am not sure why it worked. Because in iPhone se iOS 10 I don't have to delete this line. But it did work in iPod touch iOS 9.3. So check it if you have the same situation like me.
Please check the *.framework If there is a _CodeSignature signature framework directory.
If there is no _CodeSignature folder,
Navigate to the Build Phases ,click + to add New Copy File Phase to create Copy Files.
after that, reference *.framework and choose Code Sign On Copy

Resources