ionic: missing entitlements for iOS project - ios

I have developed ionic application with following environment. Now, I need to transfer the work to my colleague but he is unable to build fully functional app which includes capabilities such as 'Associated domains', 'Background Modes' and 'Push Notifications'.
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.10
Cordova Platforms : android 7.1.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
Node : v10.8.0
npm : 6.2.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000
Although he is able to build and archive the project, generated ipa has no entitlements listed(all of them are ON at capability selections) and Certificate says "Unknown" at the export dialog using Organizer.
We are using the same certificates, profiles and everything but the OS.
I am using macOS High Sierra with Xcode 9.4.1 and he is using macOS mojave and Xcode 10.1.
Our Android version of app can be build and run fine.
Does anyone have similar experience and know how to resolve this issue?
Thank you in advance.

We found this thread on apple developer forum and by downgrading Xcode, the build problem was resolved.
Old version of Xcode can be downloaded here.

Related

Why can't Xcode find the info.plist in this Ionic app?

I have not been able to get around this error. Not sure why it's throwing this. I have other similar Ionic apps that build just fine. I don't see any differences and haven't been able to find a resolution online. Below is the error:
Info.plist Utility Error Group
error: could not read data from
'.../brt-portal/platforms/ios/CordovaLib/Cordova/Info.plist':
The file “Info.plist” couldn’t be opened because there is no such
file.
Here is my Ionic and Xcode info for the project
Ionic:
Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/#ionic/cli)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : no whitelisted plugins (22 plugins total)
Utility:
cordova-res (update available: 0.15.1) : 0.9.0
native-run : 1.0.0
System:
ios-deploy : 1.10.0
ios-sim : 6.1.3
NodeJS : v13.13.0 (/usr/local/Cellar/node/13.13.0_1/bin/node)
npm : 6.14.2
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
This sounds like it's related to modern build system. Namely, XCode 10 uses the modern build system by default, whereas Cordova 4.5.5 does not.
What you could do is either to update to cordova-ios 5.0+ (platform remove and platform add to be sure everything is rebuilt correctly).
Or force XCode to use Legacy build system via: ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0, or create a build.json in your project root with:
{
"ios": {
"debug": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
},
"release": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
}
}
}
Or open your XCode workspace and click File -> Workspace Settings -> Build System: Legacy Build System

Ionic 3 build with --minifyjs flag get stucks on first load of app only in iOS

I have an Ionic 3 app that runs well in Android and iOS without the --prod flag. Now I want to test the App in production mode in iOS and Android.
When I try to run it on Android everything works great! and a little bit faster and smoother. Now I try to run it on iOS which it doesn't work. It gets stuck on the first load of the App on the Splashscreen. At first I expect that there is something wrong in my plugins or versions compatibility of my plugins and to the version of the iOS device.
But I was wrong I try to run it without the --uglifyjs, --minifycss, -aot, --optimizejs and it works, the app didn't get stuck at the first booth or first load. All these flags are part of the --prod flag right? But you notice that I didn't include --minifyjs in the flag. Because when I try to run it on --minifyjs the problem occurs again when it got stucks on the first load of the app.
I have also reference to my old question: Ionic cordova run ios --prod gets stuck on splash screen loader but that wasn't the problem anymore. It only happens when I try to use the --minifyjs flag.
Here is my ionic info:
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.2.0
Cordova Platforms : ios 4.5.5
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v8.9.3
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
So what can be the problem with that? I think it is more of a compiling issue of minifying js files by angular and ionic by reducing its size. I think it affects some of the js files that caused the problem.
Appreciate if someone could help. Thanks in advance.

integrating OneSignal into Ionic 3 causes problem on iOS device

I have an ionic application which works fine both on android and iOS, in simulator and in real devices.
I have integrated the OneSignal API to add notifications to my application.
On android everything works fine, but the problem shows up when running on an iOS device.
These are the steps I use to run the project on iOS:
- Add the iOS platform with the command ionic cordova platform add ios
- Build the ionic app source to generate the Xcode project with the command ionic cordova build ios --prod or ionic cordova build ios
- Open generated project in Xcode
- Assign the team to the project
- Add push notification to project from the tab 'capabilities'
- Add remote notification to background mode
- Generate the .cer and .p12 certifications
- Add them to The OneSignal project on the OneSignal dashboard
- Run the project
After that when I build the app from Xcode to the iOS device (connected to my mac via a cable), the notification permission popup appears, I accept it and the notifications comes when I send them from the OneSignal dashboard.
But when I try running the app again (with the iOS device not connected to the mac) it does not work, the splash screen keeps loading infinitely.
I noticed another thing that when building with --prod flag the app does not work neither when connected to the mac or not. But without that flag, it works only when running it from Xcode as I said before.
I am almost certain that's due to the OneSignal API since without it, everything works fine when connected to the mac or not.
OneSignal version: ^2.4.2
iOS version: 10.3.3
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.0.6 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.9
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : ios 4.5.5
System:
ios-deploy : 2.0.0
NodeJS : v8.10.0 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment:
ANDROID_HOME : not set

Ionic 3 IOS App does not work for first launch, but works after force kill and launch

I am building an IOS app using IONIC.
When I first launch the App in simulator or real device, the app is stuck on splash screen. Platform ready event is never getting called and thus splashscreen is never hidden. But it works fine after I kill the app and launch again. No idea which direction should I look in. Here is my ionic info
#ionic/cli-utils : 2.0.0-rc.6
ionic (Ionic CLI) : 4.0.0-rc.6
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
NodeJS : v8.9.1
npm : 6.0.0
OS : macOS High Sierra
Xcode : Xcode 9.4 Build version 9F1027a
Environment Variables:
ANDROID_HOME : /Users/ashfaq/Library/Android/sdk/
please try this :
In xCode File > Workspace Settings > Build System : Legacy Build System
In Signing Team, be sur to use Team and provisioning Profile with developer capability (Debug) and not for production (Realse)

Error while Running ionic 3 on iOS

I developed an ionic 3 application on the windows operating system (Windows 8) build the app for android and everything work fine.
Then I need to build for iOS , so I copied the project to MacBook to build for IOS.
I have run the latest npm but when I run
ionic Cordova emulate ios --target="iPhone-X"
it load the simulator but then displays the error below
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
logPath: /Users/lekan/desktop/testProject/platforms/ios/cordova/console.log
What are my doing wrong
Below is my ionic info
ionic info
Result
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.15.2
ionic (Ionic CLI) : 3.15.2
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.5.2
Ionic Framework : ionic-angular 3.7.1
System:
Node : v6.11.4
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I cant find the error for
ionic Cordova emulate ios
but if you go there
platforms/ios/cordova and click on run file the simulator work perfectly

Resources