Skip to content

Commit

Permalink
Merge pull request #73 from razorpay/r/v2.0.5
Browse files Browse the repository at this point in the history
iOS release 2.0.5 readme update
  • Loading branch information
iThink32 authored May 7, 2018
2 parents 7aa6427 + 18b4ad4 commit f95a257
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@

React Native wrapper around our Android and iOS mobile SDKs

**Note**: This release contains a module map embedded in the framework which by default considers that your Xcode is named Xcode.app.If your Xcode is named differently please copy the script added in the scripts/ , paste it and run it in the folder containing the razorpay framework.

For eg:

if the razorpay framework is in

/node_modules/react-native-razorpay/ios/Razorpay.framework

paste the script in /node_modules/react-native-razorpay/ios

and run the scipt , it will perform the required changes to the module map in the framework , you can then copy it and use it like before.


**Note**: This release is meant for Xcode 9.3 as it uses a framework compiled in Swift 4.1.This will not work in Xcode 9.2 as you will get a "dlyd error : framework not found error".In case you are using an older version of Xcode and need Swift 3.1 visit the following link and download the respective framework.

https://razorpay.com/docs/ios
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Razorpay.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Razorpay.Swift {
}

module RazorpayCommonCrypto [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h"
header "/Applications/Xcode9.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h"
export *
}

Expand Down
25 changes: 25 additions & 0 deletions example/ios/SelectDefaultXcode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# to make sure that any command that fails in turn return a non zero status and does not continue further

set -e

# get framework path from command line or use the current working directory as the path

if [ $# -eq 0 ] ; then
FRAMEWORK_PATH=$(pwd)/Razorpay.framework/
echo "Using the current working directory as the framework path which is $FRAMEWORK_PATH"
else
FRAMEWORK_PATH=$1
fi

#navigate to the module map

cd "$FRAMEWORK_PATH/Modules/"

#find xcode path and replace it with the default

DEFAULT_XCODE_PATH="$(xcode-select -p)"
IFS='/'
read -ra ARRAY <<< "$DEFAULT_XCODE_PATH"
XCODE_COMPONENT=${ARRAY[2]}
STRING_TO_BE_REPLACED="Xcode.app"
sed -i '' "s/$STRING_TO_BE_REPLACED/$XCODE_COMPONENT/g" module.modulemap

0 comments on commit f95a257

Please sign in to comment.