You need to sign in to do that
Don't have an account?
Harry Dhanoa
podspec
Hello,
Am trying to create a native mobile app in SF.
Started with the trailhead :-
https://trailhead.salesforce.com/trails/mobile_sdk_intro/modules/mobile_sdk_native_ios/units/mobilesdk_ios_getting_started
Successfully finished all the steps on my macbook until I hit this command:-
forceios create
Application type native
Application name MyTrailNativeApp
Package name com.mytrail.ios
Organization name MyApps, Inc.
Output directory TrailiOSApps
The Output is:-
********************************************************************************
*
* Creating ios native application using Salesforce Mobile SDK
* with app name: MyTrailNativeApp
* package name: com.mytrail.ios
* organization: MyApps, Inc.
*
* in: TrailiOSApps
*
* from template repo: https://github.com/forcedotcom/SalesforceMobileSDK-Templates#v5.1.0
* template path: iOSNativeTemplate
*
********************************************************************************
/Users/harpritdhanoa/Documents/mobileAppsSF/MyReact/ios/TrailiOSApps /Users/harpritdhanoa/Documents/mobileAppsSF/MyReact/ios
Installing npm dependencies
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 1.307s
Installing pod dependencies
Update all pods
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `SalesforceAnalytics` from `node_modules/SalesforceMobileSDK-iOS`
[!] No podspec found for `SalesforceAnalytics` in `node_modules/SalesforceMobileSDK-iOS`
[!] Automatically assigning platform ios with version 9.0 on target MyTrailNativeApp because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
/Users/harpritdhanoa/Documents/mobileAppsSF/MyReact/ios
forceios failed
Command failed: pod update
I googled a lot but could not find anything relevant online, hence thought I ask the gurus out here.
Any help would be appreciated.
-Harry
Am trying to create a native mobile app in SF.
Started with the trailhead :-
https://trailhead.salesforce.com/trails/mobile_sdk_intro/modules/mobile_sdk_native_ios/units/mobilesdk_ios_getting_started
Successfully finished all the steps on my macbook until I hit this command:-
forceios create
Application type native
Application name MyTrailNativeApp
Package name com.mytrail.ios
Organization name MyApps, Inc.
Output directory TrailiOSApps
The Output is:-
********************************************************************************
*
* Creating ios native application using Salesforce Mobile SDK
* with app name: MyTrailNativeApp
* package name: com.mytrail.ios
* organization: MyApps, Inc.
*
* in: TrailiOSApps
*
* from template repo: https://github.com/forcedotcom/SalesforceMobileSDK-Templates#v5.1.0
* template path: iOSNativeTemplate
*
********************************************************************************
/Users/harpritdhanoa/Documents/mobileAppsSF/MyReact/ios/TrailiOSApps /Users/harpritdhanoa/Documents/mobileAppsSF/MyReact/ios
Installing npm dependencies
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 1.307s
Installing pod dependencies
Update all pods
Updating local specs repositories
Analyzing dependencies
Fetching podspec for `SalesforceAnalytics` from `node_modules/SalesforceMobileSDK-iOS`
[!] No podspec found for `SalesforceAnalytics` in `node_modules/SalesforceMobileSDK-iOS`
[!] Automatically assigning platform ios with version 9.0 on target MyTrailNativeApp because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
/Users/harpritdhanoa/Documents/mobileAppsSF/MyReact/ios
forceios failed
Command failed: pod update
I googled a lot but could not find anything relevant online, hence thought I ask the gurus out here.
Any help would be appreciated.
-Harry
I found a work around for the above by demoting to a lower version of forcedroid and forceios and it works!!
Here are the steps:-
-----------------------ANDROID-----------------------
https://trailhead.salesforce.com/modules/mobile_sdk_native_android/units/mobilesdk_android_getting_started
#only version 4.1 works
sudo npm install -g forcedroid@4.1
#Commands to setup environment
export ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
#Commands to create app
rm -rf MyFirstApp
mkdir MyFirstApp
forcedroid create --apptype="native" --appname="MyFirstApp" --targetdir="MyFirstApp" --packagename="com.myapps.android" --usesmartstore="no"
-----------------------IOS-----------------------
#only version 5.1 works
sudo npm install -g forceios@5.1
forceios create --apptype="native" --appname="IOSNativeApp" --packagename="com.hapdi.myapp" --organization="Hapdi, Inc." --outputdir="IOSNativeApp"
#The above command will fail; make changes to the
vi IOSNativeApp/Podfile
project 'IOSNativeApp.xcodeproj'
target 'IOSNativeApp' do
source 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS-Specs.git' # needs to be first
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod 'SalesforceAnalytics'
pod 'SalesforceSDKCore'
pod 'SmartStore'
pod 'SmartSync'
end
# Then run the command
cd IOSNativeApp
pod update
Hope it helps u.
-H