session-ios/Makefile
Michael Kirk 1dd06a5e6c Fix registration flow / Keep push tokens in sync
* Separate registering an account from registering for push notifications
  * Allows us to complete registration without prompting user for
    notification settings.

UX Changes
----------
* Automatically keep push tokens in sync on startup.
  Push tokens *can* change, though they rarely do. It happens more often
  for people switching between appstore/beta builds.

  fixes #1174

* Show alert with registration failure
  * add secret 8-tap debug log gesture to registration flow

* Move registration to separate flow
  * don't see flash of inbox when first launching

* show useful error messages when given wrong code / no code

* remove background fetch
  We werent using it, but only relying on a side effect of it which is
  no longer necessary.

Code Changes
------------

* More registration logging.

* Install PromiseKit with carthage

  Our dependencies are not yet framework compatible, so we can't use
  cocoapods.

* Merge preferences util "category" into superclass.

  The immediate reason for this is Swift interop was assuming optional
  types were not optional, and exploding when a value was nil.

  This is clearer anyway, since we were treating it like a subclass, and
  it was the only thing using the class anyway.

* auto-genstrings now searches *.swift (and *.h, which was previously
  broken) for translateable strings.

// FREEBIE
2016-11-03 16:13:49 -04:00

45 lines
1.2 KiB
Makefile

# Make sure we're failing even though we pipe to xcpretty
SHELL=/bin/bash -o pipefail -o errexit
# iPhone6, iOS10
DEVICE_UUID:=$(shell xcrun instruments -s | grep -o "iPhone 6 (10.0) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$$/\1/")
BUILD_DESTINATION = platform=iOS Simulator,id=${DEVICE_UUID}
WORKING_DIR = ./
SCHEME = Signal
XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator
.PHONY: build test retest clean
default: test
ci: build_dependencies test
build_dependencies:
cd $(WORKING_DIR) && \
git submodule update --init
pod install
carthage build --platform iOS
build: build_dependencies
cd $(WORKING_DIR) && \
$(XCODE_BUILD) build | xcpretty
test: optional_early_start_simulator
cd $(WORKING_DIR) && \
$(XCODE_BUILD) \
-destination '${BUILD_DESTINATION}' \
test | xcpretty
clean:
cd $(WORKING_DIR) && \
$(XCODE_BUILD) \
clean | xcpretty
optional_early_start_simulator:
ifdef EARLY_START_SIMULATOR
echo "Waiting for simulator to start to help with testing timeouts" &&\
xcrun instruments -w '${DEVICE_UUID}' || true # xcrun can return irrelevant non-zeroes.
else
echo "Not waiting for simulator."
endif