Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 5 support? #33

Open
mohsinalimat opened this issue May 11, 2019 · 5 comments
Open

Swift 5 support? #33

mohsinalimat opened this issue May 11, 2019 · 5 comments

Comments

@mohsinalimat
Copy link

Hello,

Swift 5 support?

@abhuzz
Copy link

abhuzz commented Jun 3, 2019

I have to implement this payment module in my application but it demo can not work in latest XCode 10.2.1
Screenshot 2019-06-03 at 12 45 00 PM

It's show me this error
Screenshot 2019-06-03 at 12 45 36 PM

I tried to implement latest update of "Instamojo" podfile
Screenshot 2019-06-03 at 12 44 29 PM

but it's not working any more. Please Provide some useful information for this issue.

@mohsinalimat
Copy link
Author

???

@mohsinalimat
Copy link
Author

no reply from instamojo....

@cybenauts
Copy link

Where is the support it's been months?

@cybenauts
Copy link

After several days I found a solution the the existing issue (build on latest version of Xcode/Swift), follow the instructions below -
1- Install the pod from (https://docs.instamojo.com/page/ios-sdk) into your Project
2- Close the project and download the Git folder from (https://github.com/Instamojo/ios-sdk)
3- Unzip & open the folder & delete Instamojo.framework
4- Now open the Instamojo workspace in the latest version of Xcode
5- Build for any simulator (select any simulator and build) (if faced with issues like pod not found goto Project->Targets->Build Phases->Remove and re-add linked binaries i.e pod file)
6- Build for Generic iOS Device
7- Goto Build Phases & add the Run Script

UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal

if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"

xcodebuild -target "${PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos  BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build
xcodebuild -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build

cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"

cp -R "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/." "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule"

lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework/${PROJECT_NAME}"

cp -R "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}"

open "${PROJECT_DIR}"

fi

8- Build again, this will open your Instamojo folder locate Instamojo.framework copy it.
9- Go to your project -> Pods->Instamojo replace Instamojo.framework
10- Now clean & build your project, after this you can run your project on any simulator/device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants