*********************************
InWebo - Application Demo IOS
*********************************

Configuration
=============

Current SDK Version : iOS 15
Minimum SDK Version : iOS 13
Swift 5

Documentation
-------------

* [mAccess](https://docs.inwebo.com/documentation/1687970.html)

Prerequisites
-------------

1. If your app need to receive remote push notification, you'll need to add your `GoogleService-Info.plist` in the app directory (`Demo IOS/Demo IOS`).
   Check more information on the firebase's documentation: https://firebase.google.com/docs/ios/setup
2. In `Demo IOS/Demo IOS/AppDelegate.swift`, configure:
   - your `macid` (`macAccess`)
   - your `hostVersion` (`hostVersion`)

NOTE
----

You can find the lib `maccess-iphone` in directory `maccess`.

The mAccess library can be downloaded from [Resources downloads](https://docs.inwebo.com/documentation/1903283.html)


Build
=====

All the following commands need to be run in the ios root directory. Where the `<project>.xcodeproj` is located

List all info :
`xcodebuild -list`

Build the default app :
`xcodebuild build -scheme "Demo iOS" -sdk iphoneos`

Build the build without the optimization flag :
`xcodebuild build -scheme "Demo iOS" -sdk iphoneos -configuration "Release no-opti"`

Creating the .xcarchive in a build directory :
`xcodebuild -scheme "Demo iOS" -sdk iphoneos -configuration "Release" archive -archivePath ./build/Demo.xcarchive`

Sign the .xcarchive to build an ipa :
`xcodebuild -exportArchive -archivePath ./build/Demo.xcarchive -exportOptionsPlist exportOptions.plist -exportPath ./build/`

exportOptions example :

```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>ad-hoc</string>
    <key>teamID</key>
    <string>**TEAM_ID**</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>com.inwebo.demo</key>
        <string>Demo Inwebo adhoc</string>
    </dict>
</dict>
</plist>
```
